{include file="header"}
<div class="x-nav">
           <span class="layui-breadcrumb">
            <a href="">{:lang("system")}</a>
            <a href="">{:lang("user")}</a>
            <a>
              <cite>{:lang("user.pass")}</cite></a>
          </span>

</div>
<div class="layui-fluid">
    <div class="layui-row">
        <form class="layui-form">
            <input type="hidden" name="id" value="{$user.id}">
            <div class="layui-form-item">
                <label class="layui-form-label">
                    <span class="x-red"></span>{:lang('username')}
                </label>
                <div class="layui-form-mid layui-word-aux">
                    {$user.username}
                </div>


            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">
                    <span class="x-red">*</span>{:lang('pass')}
                </label>
                <div class="layui-input-block">
                    <input type="password" name="password" placeholder="{:lang('please.enter')}{:lang('pass')}" autocomplete="off" class="layui-input">
                </div>
                <div class="layui-form-mid layui-word-aux">
                    <span class="x-red"></span>6-18 {:lang('letter')}、{:lang('digital')}
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">
                    <span class="x-red">*</span>{:lang('confirm')}{:lang('pass')}
                </label>
                <div class="layui-input-block">
                    <input type="password" name="pass" placeholder="{:lang('confirm')}{:lang('pass')}" autocomplete="off" class="layui-input">
                </div>
                <div class="layui-form-mid layui-word-aux">
                    <span class="x-red"></span>
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">
                </label>
                <button  class="layui-btn" lay-filter="add" lay-submit="">
                    {:lang('edit')}
                </button>
            </div>
        </form>
    </div>
</div>
{include file="footer"}
<script>
    layui.use(['form', 'layer'], function() {
        $ = layui.jquery;
        var form = layui.form,
            layer = layui.layer;

        //监听提交
        form.on('submit(add)', function(data) {

            request("POST",'{:url("user/pass")}',data.field,function (res,msg) {
                //发异步，把数据提交给php

                layer.alert(msg, {icon: 6}, function() {
                    xadmin.close();
                });
            })

            return false;
        });

    });
</script>